package com.csdj.t309.proxy;

import org.apache.ibatis.javassist.runtime.Inner;

public class SingleInstance {

    private static SingleInstance instance;
    //私有化构造方法
    private SingleInstance(){
        System.out.println("创建单例");
    }

    public static SingleInstance getInstance(){
        return Inner.instance;
    }

    public static void test(){
        System.out.println("单例测试");
    }

    static class Inner{
        static SingleInstance instance = new SingleInstance();
    }
}
